From: Milan Crha Date: Tue, 21 Apr 2026 15:38:10 +0000 (+0200) Subject: endSessionDialog: Differentiate between prepared and scheduled updates again X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~10^2^2~30 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=23ed6d2cd666f1e03159506ac19d5b2478cf54ad;p=gnome-shell.git endSessionDialog: Differentiate between prepared and scheduled updates again The prepared updates are those downloaded, while the scheduled updates are those ready to be installed the next machine boot. The previous gnome-software change with its OfflineUpdates D-Bus interface did not count with it and claimed all the updates as scheduled, even when they had been only prepared. This makes it work again by utilizing the gnome-software changes. Part-of: --- diff --git a/data/dbus-interfaces/org.gnome.Software.OfflineUpdates.xml b/data/dbus-interfaces/org.gnome.Software.OfflineUpdates.xml index 82356bc70..15a20fc70 100644 --- a/data/dbus-interfaces/org.gnome.Software.OfflineUpdates.xml +++ b/data/dbus-interfaces/org.gnome.Software.OfflineUpdates.xml @@ -14,8 +14,9 @@ diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js index 7b666f090..84da30558 100644 --- a/js/ui/endSessionDialog.js +++ b/js/ui/endSessionDialog.js @@ -668,11 +668,13 @@ class EndSessionDialog extends ModalDialog.ModalDialog { try { const state = await this._getUpdateState(); + this._updatePrepared = state === 'prepared'; this._updateScheduled = state === 'scheduled'; } catch (e) { if (this._softwareOfflineUpdatesProxy !== null) log(`Failed to get update info from gnome-software: ${e.message}`); + this._updatePrepared = false; this._updateScheduled = false; } @@ -709,7 +711,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog { this._loadSessions().catch(logError); _setCheckBoxLabel(this._checkBox, dialogContent.checkBoxText || ''); - this._checkBox.visible = dialogContent.checkBoxText && this._updateScheduled; + this._checkBox.visible = dialogContent.checkBoxText && this._updatePrepared; this._checkBox.checked = this._checkBox.visible && !this._isBatteryLow();